package com.deanlib.cabinet.data.model;


import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Dean on 2022/6/21
 */
public class Login implements Parcelable {

    public User user;
    public Auth auth;


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.user, flags);
        dest.writeParcelable(this.auth, flags);
    }

    public void readFromParcel(Parcel source) {
        this.user = source.readParcelable(User.class.getClassLoader());
        this.auth = source.readParcelable(Auth.class.getClassLoader());
    }

    public Login() {
    }

    protected Login(Parcel in) {
        this.user = in.readParcelable(User.class.getClassLoader());
        this.auth = in.readParcelable(Auth.class.getClassLoader());
    }

    public static final Parcelable.Creator<Login> CREATOR = new Parcelable.Creator<Login>() {
        @Override
        public Login createFromParcel(Parcel source) {
            return new Login(source);
        }

        @Override
        public Login[] newArray(int size) {
            return new Login[size];
        }
    };
}
